package Panels;

import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import Code.TablePanelInfo;


public class QueryResults extends JPanel{

	private TablePanelInfo TPInfo;
	
	public QueryResults(TablePanelInfo TPanelInfo){
		TPInfo=TPanelInfo;
		setLayout(new BorderLayout());
		
		String[] Columns={"Status","Query","Error"};
		
		DefaultTableModel TModel=new DefaultTableModel(Columns,0);
		TPInfo.SetResultsTable(TModel);
		JTable Table=new JTable(TModel);
		Table.getColumnModel().getColumn(0).setMaxWidth(50);
		JScrollPane scrollPane=new JScrollPane();
		scrollPane.setViewportView(Table);
		add(scrollPane,BorderLayout.CENTER);

	}
	
	
}
